<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns:ui="http://java.sun.com/jsf/facelets"
                template="./../Template/AdminTemplate.xhtml"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui">

    <ui:define name="content">
        <h:form id="form">
            <p:growl id="messages" showDetail="true"/>
            
                
                <p:dataTable value="#{registrationControl.allRegistration}" var="item" tableStyle="width:auto" widgetVar="carsTable"   
            emptyMessage="No Register found with given criteria">
                    <f:facet name="header"> 
                        <p:outputPanel>  
                        <h:outputText value="Search all fields:" />  
                        <p:inputText id="globalFilter" onkeyup="carsTable.filter()" style="width:150px" />  
                    </p:outputPanel>
                    </f:facet>
                    <p:column headerText="UserName" style="width:150px" id="usernameColumn" filterBy="#{item.userName}" filterOptions="#{userControl.userList}" filterPosition="top" filterMatchMode="exact">  
                              
                                    <h:outputText value="#{item.userName}" />  
                    </p:column>
                    <p:column headerText="Event" style="width:125px" id="eventIdColumn" filterBy="#{item.eventId}" filterOptions="#{prizeControl.eventList}" filterPosition="top" filterMatchMode="exact">  
                              
                                    <h:outputText value="#{item.eventId.title.substring(0,10)}" />  
                                  
                    </p:column>
                    <p:column headerText="RegDate" style="width:125px">  
                              
                        <h:outputText value="#{item.regDate}" >
                            <f:convertDateTime pattern="MM/dd/yyyy"/>
                        </h:outputText>
                    </p:column>
                    <p:column headerText="isAccept" style="width:125px"  >  
                              
                        <h:outputText value="#{item.regDate}" >
                            <f:convertDateTime pattern="MM/dd/yyyy"/>
                        </h:outputText>
                    </p:column>
                    
                    <p:column headerText="Options" style="width:50px">  
                        
                    </p:column> 
                        
                    </p:dataTable>
                
            

        </h:form>

    </ui:define>

</ui:composition>
